/*
********************************************************************************
* Copyright (C) 2022, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : safe_manager.h
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2022-03-06 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/
#ifndef __SAFE_MANAGER_H__
#define __SAFE_MANAGER_H__

#include <vector>
#include "part_gpu.h"
#include "part_sound_card.h"
#include "visitor_driver.h"
#include "visitor_function.h"

typedef enum
{
    ITEM_DRIVER = 0,
    ITEM_FUNCTION,
    ITEM_ALL,
}ECheckItem;

class CSafeMgr
{
public:
    CSafeMgr();

    ~CSafeMgr();

    void AddPartArray(CComputePartBase *);

    void Accept(CVisitorBase *visitor);

    void CheckItem(ECheckItem item);

private:
    CPartGpu         *mpGpu;
    CPartSoundCard   *mpSoundCard;
    CVisitorDriver   theDriverCheck;
    CVisitorFunction theFunctionCheck;
    std::vector<CComputePartBase *> mPartArray; 
};

#endif

